package cn.mst.vrs.convert;

import cn.mst.vrs.controller.admin.authtype.vo.AuthTypeDictRespVO;
import cn.mst.vrs.dal.dataobject.authtype.AuthTypeDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface AuthTypeConvert {
    AuthTypeConvert INSTANCE = Mappers.getMapper(AuthTypeConvert.class);

    @Mapping(target = "value", source = "id")
    @Mapping(target = "label", source = "code")
    AuthTypeDictRespVO toDictRespVO(AuthTypeDO entity);

    List<AuthTypeDictRespVO> toDictRespVOList(List<AuthTypeDO> entityList);
}
